#ifndef  __STRATEGY_ENGINE_MANAGER_H_
#define  __STRATEGY_ENGINE_MANAGER_H_

#include "logger.h"
#include "communication_manager.h"
#include "strategy_engine.h"

#include <libxml/tree.h>
#include <stdio.h>
#include <string>
#include <map>


class StrategyEngineManager
{
public:
    StrategyEngineManager() {}
    ~StrategyEngineManager()
    {
        std::map<std::string, StrategyEngine*>::iterator iter = m_StrategyEngineTable.begin();
        while(iter != m_StrategyEngineTable.end())
        {
            delete iter->second;
            iter->second = NULL;
            ++iter;
        }
        m_StrategyEngineTable.clear();
    }
    bool LoadEngines(const char* stConf, CommunicationManager* cManager);
    void ResetStrategys(CommunicationManager* cManager);
    StrategyEngine* GetStrategyEngine(const std::string& engineName);
private:
    std::map<std::string,  StrategyEngine*> m_StrategyEngineTable;
};















#endif  //__STRATEGY_ENGINE_MANAGER_H_

/* vim: set expandtab ts=4 sw=4 sts=4 tw=100: */
